<?php

namespace Database\Factories;

use Illuminate\Database\Eloquent\Factories\Factory;

/**
 * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\WeddingDress>
 */
class WeddingDressFactory extends Factory
{
    private $i = -1;

    public function definition()
    {
        $this->i++;
        $images = ['凤冠霞披.jpg','香槟色秀禾服.jpg','中式传统龙凤嫁衣.jpg','西式纯白花嫁.jpg','西式梦幻婚纱.jpg','西式超长拖尾婚纱.jpg'];
        $names = ['凤冠霞披','香槟色秀禾服','中式传统龙凤嫁衣','西式纯白花嫁','西式梦幻婚纱','西式超长拖尾婚纱'];
        $dresstheme = '喜庆';
        $dressprice = [520, 1314, 1320, 1420, 52014];
        $typeid = 1;
        if($this->i>=3){
            $dresstheme = '纯洁';
            $typeid = 2;
        };
        return [
            'dressname' => $names[$this->i],
            'dressphoto' => $images[$this->i],
            'dressintroduce' => '每件婚纱都有存在的意义，你第一眼看到的就是你想要的',
            'dresstheme' => $dresstheme,
            'is_delete' => 1,
            'dressprice' => $dressprice[random_int(0,4)],
            'typeid' => $typeid
        ];
    }
}
